package com.xxx.server.controller;


import com.xxx.server.pojo.Department;
import com.xxx.server.service.IDepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  部门管理
 * </p>
 *
 * @author cd
 * @since 2023-12-24
 */
@RestController
@RequestMapping("/system/basic/department")
public class DepartmentController {
    @Autowired
    private IDepartmentService departmentService;

    @GetMapping("/getAllDepartment")
    public List<Department> getAllDepartments(){
        List<Department> departments = departmentService.getDepartments();
        return departments;
    }

}
